import '../bean/wirelesstm_bean.dart';
import '../utils/api/http.dart';
import '../utils/tools/localstorage_tool.dart';

class WirelessTm {

  /// 获取无线无缘测温
  /// * [par] Map|必填|台区id
  static Future reqWirelessTmInfo(par) async {
    List<WirelesstmBean> list = [];
    String token = await LocalStorage.getStringItem("token");
    var res = await HttpManager.getInstance().get('tMData/getNewestPmTemperatureMeasurementData?token=${token}', params: par);
    if(res["data"] != null){
      res["data"].forEach((key, value){
        list.add(WirelesstmBean(key,value));
      });
      return list;
    }else{
      return null;
    }
  }
}